import React, { Component, Fragment } from 'react';
import { Card, Button, message  } from 'antd';

import './ui.less';

class Message extends Component {
	showMsg = (type) => {
		message[type]("react晋级成功")
	}
	render(){
		return(
			<Fragment>
				<Card title="Message全局提示" className="card-wrap">
					<Button type="primary" onClick={()=>this.showMsg("success")}>success</Button>
					<Button type="info" onClick={()=>this.showMsg("info")}>info</Button>
					<Button type="primary" onClick={()=>this.showMsg("loading")}>loading</Button>
				</Card>
			</Fragment>
		)
	}
}

export default Message;